
using FriendStar.Domain.Entity.WareHouse;
using FriendStar.Domain.IRepository.WareHouse;
using FriendStar.Repository.WareHouse;
using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugarRepository;

namespace CopyrightFriendStar.Application.WareHouse
{
    public class CYK_21_KC_StoLJKStockCataApp
    {
        private ICYK_21_KC_StoLJKStockCataRepository service = new CYK_21_KC_StoLJKStockCataRepository();

        public List<CYK_21_KC_StoLJKStockCataEntity> GetList()
        {
            return service.IQueryable().ToList();
        }
        public CYK_21_KC_StoLJKStockCataEntity GetForm(string keyValue)
        {
            return service.FindEntity(keyValue);
        }
        public void DeleteForm(string keyValue)
        {
            
        }
        public void SubmitForm(CYK_21_KC_StoLJKStockCataEntity CYK_21_KC_StoLJKStockCataEntity, string keyValue)
        {
            if (!string.IsNullOrEmpty(keyValue))
            {
                service.Update(CYK_21_KC_StoLJKStockCataEntity);
            }
            else
            {
                service.Insert(CYK_21_KC_StoLJKStockCataEntity);
            }
        }
    }
}
